FIG. 1 shows an example of a prior art current-control profile having 8 current-control phases, namely, off, pre-charge, peak, clamp0, hold0, clamp1, hold1, and off. A control signal, referred to in FIG. 1 as NON, is also shown. The control signal is de-asserted (High) during the first and second off phases and is asserted (Low) during the other phases. As is the case for all of the signals discussed herein, the polarity (i.e., whether the signal is asserted when it is high or when it is low) of the control signal shown in FIG. 1 is not significant (i.e., the polarity could be reversed instead).
Two conventional control approaches are known for generating such current-control profiles.
A fixed state-machine approach, which typically provides limited flexibility. FIG. 2 shows a fixed state-machine 200 that controls electrical current supplied to the target device 202 in accordance with the prior art.
The sequence of current phases is hard-wired into the control circuit allowing configuration of the parameters of the built-in phases only. As used herein, the terms “hardwired” and “implemented in hardware” refer to control-unit functionality that is implemented through use of sequential logic units, featuring a finite number of gates that can generate specific results based on the inputs to the control unit. According to a fixed state-machine approach, possible current profiles are limited to the phases and sequences known at time of control circuit design. This approach shows a limited flexibility in terms of building new current profiles.
A micro-sequencer approach typically provides undefined safety behavior. FIG. 3 shows a micro-sequencer 300 that controls electrical current supplied to the target device 202 in accordance with the prior art.
The behavior of the control circuit is determined during run-time by means of a code sequence as in the case of a micro-controller (e.g. software-based approach). Since the behavior of the control circuit is based on software, it is difficult, and potentially impossible, to prove an appropriate operation under all circumstances, such as a deactivation of the solenoid after a specified time after the control signal is de-asserted. Further, in a micro sequencer-based implementation, individual functions, such as turn-on and turn-off of an NMOS (n-channel metal oxide semiconductor), comparing the injector current to defined thresholds, reacting if current thresholds are crossed, comparing phase time with defined set point, and reacting if phase time has elapsed, are normally implemented in embedded microcode, which is typically very complex but versatile. A shortcoming of this approach lies in its complexity. For example, a typical program sequence for threshold detection might be as follows: 1. Program the comparator reference to the desired value. 2. Set up and enable an interrupt to be triggered when the comparator level has been satisfied. 3. Push variables associated with this function onto a stack or otherwise store them for later retrieval. 4. Branch to a wait loop or resume other processing. 5. When the comparator interrupt has fired, branch to the interrupt processing routine. 6. Retrieve the variables associated with this function from their storage location. 7. Turn on (or off) the output associated with the current control channel. 8. From within the interrupt, flag that the comparator has tripped, so that a new phase may be entered by the main program if necessary. 9. Load a new comparator reference level for the next step in the current control loop. As this sequence demonstrates, testing and verification of a complex software/hardware system can be extremely difficult because the system is essentially unbounded and is capable of doing many different types of things, it has the potential of doing many different things incorrectly. Problems usually result when external events happen at exactly an inappropriate time, exactly in an inappropriate order, or both, which can be very difficult to simulate in testing. We have all seen cases of software “locking up,” becoming confused, or generally causing issues in embedded systems (cell phones, tablets, GPS, etc.). While this behavior is merely annoying when your cell phone needs to be restarted, it can be catastrophic in the case of a controller for a vehicle fuel injection system.
The fixed state machine approach avoids these problems by following the same sequence every time, with no possibility for changes to the sequence. Relative to a micro sequencer-based approach, the fixed state machine type of system is much easier to verify and validate, because external events have much less influence. But this ease of testing and validation comes at the expense of versatility in that the fixed state machine is only capable of following the sequence it was designed for. So any sequence changes need to be provided for at the time of the control circuit design.
A current-control circuit, also referred to herein as a current controller, that overcomes the shortcomings mentioned above would advance the state of the art.